<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>浮动</title>
    <style type="text/css">
        *{
            margin: 0;
            padding: 0;
        }
        body{
            font: 20px "微软雅黑";
        }
        ul{
            list-style: none;
        }
        a{
            text-decoration: none;
            color: #000;
        }
        .clearfix:after{
            content: "";
            display: block;
            clear: both;
        }
        li{
            /*float: left;*/
            width: 200px;
            height: 200px;
            background: #666;
        }
        .a{
            background-color: blue;
        }
        .b{
            background-color: red;
            float: left;
        }
        .c{
            background-color: orange;
            width: 300px;
        }
    </style>
</head>
<body>
<ul>
    <li class="a"></li>
    <li class="b"></li>
    <li class="c"></li>
    <li class="d"></li>
</ul>
</body>
</html>